package cn.jly.boot.mp.cron;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.quartz.QuartzJobBean;

/**
 * @PackageName cn.jly.boot.mp.cron
 * @ClassName QuartzSimpleSchedulerJob
 * @Description 测试quartz的定时任务调度
 * @Author 姬岚洋
 * @Date 2021/1/5 下午 5:30
 */
public class QuartzSimpleSchedulerJob extends QuartzJobBean {

    private static final Logger LOGGER = LoggerFactory.getLogger(QuartzSimpleSchedulerJob.class);

    private String name;

    public void setName(String name) {
        this.name = name;
    }

    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        LOGGER.warn("hello, {} !", this.name);
    }
}
